mm: Scrub pages in alloc_heap_pages() if needed
authorBoris Ostrovsky <boris.ostrovsky@oracle.com>
Wed, 16 Aug 2017 18:30:00 +0000 (20:30 +0200)
committerJan Beulich <jbeulich@suse.com>
Mon, 21 Aug 2017 13:47:16 +0000 (15:47 +0200)
commit74d2e11ccfd2fe274ea111686c829534c815a9ae
tree394cb28a5d1aa804f0a8edb5f16b90641707d83c
parent0913366a9117241ea960d240f7fbcc659227e39b
mm: Scrub pages in alloc_heap_pages() if needed

When allocating pages in alloc_heap_pages() first look for clean pages. If none
is found then retry, take pages marked as unscrubbed and scrub them.

Note that we shouldn't find unscrubbed pages in alloc_heap_pages() yet. However,
this will become possible when we stop scrubbing from free_heap_pages() and
instead do it from idle loop.

Since not all allocations require clean pages (such as xenheap allocations)
introduce MEMF_no_scrub flag that callers can set if they are willing to
consume unscrubbed pages.

Signed-off-by: Boris Ostrovsky <boris.ostrovsky@oracle.com>
Reviewed-by: Jan Beulich <jbeulich@suse.com>
xen/common/page_alloc.c
xen/include/xen/mm.h